package com.example.mapinformationandroid.Http;

import com.example.mapinformationandroid.Model.Information;
import com.example.mapinformationandroid.Model.ResponseBase;
import com.example.mapinformationandroid.Model.User;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface APIList {

//    /**
//     *
//     * @param map
//     * @param session
//     * @return
//     */
//    @POST("information")
//    Call<String> getInformation(@QueryMap ArrayMap<String,String> map,@Header("session")String session);
//    Observable<String>  getInformations( ArrayMap<String,String> map, @Header("session")String session);

    /**
     *
     * @return
     */
    @GET("getinformationlistbypost/{postcodes},{token}")
    Observable<ResponseBase<List<Information>>> getInformation_byPostcodes(@Path("postcodes") int postcodes, @Path("token") String token);

    /**
     *
     * @return
     */
    @GET("getinformationlistbyuser/{create_user_id},{create_user_id}")
    Observable<ResponseBase<List<Information>>> getInformation_byuser(@Path("create_user_id") int create_user_id,@Path("create_user_id") String token);

    /***
     *
     *
     ***/
    @FormUrlEncoded
    @POST("login")
    Observable<ResponseBase<User>> Login(@FieldMap Map<String,String> login_map);

    @FormUrlEncoded
    @POST("register")
    Observable<ResponseBase<User>> Register(@FieldMap Map<String,String> Register_map);


    @FormUrlEncoded
    @POST("create_information")
    Observable<ResponseBase> Create_Information(@FieldMap Map<String,String> information_map);
}
